package com.turing.common.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import com.turing.common.handler.HandlerInterceptor;

/**
 * @Description webmvc配置
 * @Author lcy
 * @Date 2021/5/22 20:29
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        //添加增加拦截器
        registry.addInterceptor(new HandlerInterceptor()).addPathPatterns("/**");
    }
}
